import store from "@/store";
import useSettingsStore from "@/store/modules/settings";
/* 动态修改标题
 */
export function useDynamicTitle(mainTitle) {
  const settingsStore = useSettingsStore();
  if (settingsStore.dynamicTitle) {
    document.title =
      (settingsStore.title || "首页") + " - " + mainTitle ||
      "阿尔格敏智能穿爆平台";
  } else {
    document.title = "阿尔格敏智能穿爆平台";
  }
}
